package com.ljf.jdvideo;

import java.io.File;
import java.io.IOException;

import org.openqa.selenium.chrome.ChromeDriverService;

import com.ljf.jdvideo.ui.UI;

public class Main {
    public static final String savePath = "d:\\京东";
    public static ChromeDriverService service;
    public static void main(String[] args) throws IOException, InterruptedException {
        if(!new File("driver").exists()) {
            new File("driver").mkdir();
        }
        
//        String path = Main.class.getResource("/").getPath();
//        System.out.println(path);
        service = new ChromeDriverService.Builder()
                .usingDriverExecutable(new File("driver/chromedriver.exe"))
                .usingAnyFreePort()
                .build();
        service.start();
        if(!new File(savePath).exists()) {
            new File(savePath).mkdirs();
        }
        
        new UI();
    }
}
